package com.itljm.cxrMarket.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.security.Permission;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 权限信息表
 */
@Data
public class SysPermission implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;// 权限名称
    private Long parentId;// 父级权限id
    private String description;// 权限描述
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    // 子节点列表（树形结构
    @TableField(exist = false)
    private List<SysPermission> children;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}